package com.feng.seata.rpc;

import com.feng.common.model.Result;
import com.feng.seata.model.OrderModel;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("product-tcc")
public interface ProductClient {

    @PutMapping("/products/minus/stock")
    Result<?> minusStock(@RequestParam("buyNum") Integer buyNum);


    @PostMapping("/products/deduct4TCC")
    Result<?> minusStock(@RequestBody OrderModel orderModel);

}
